<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改申请开票')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sqkp-edit" th:object="${gcProjectSqkp}">
        	<h4 class="form-header h4">开票详情</h4>
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">项目编号：</label>
                <div class="col-sm-4">
                    <input name="orderNo" th:field="*{orderNo}" class="form-control" type="text" readonly="readonly" required>
                </div>
                <label class="col-sm-2 control-label is-required">项目名称：</label>
                <div class="col-sm-4">
                    <input name="xmmc" th:field="*{xmmc}" class="form-control" type="text" readonly="readonly" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">申请时间：</label>
                <div class="col-sm-4">
                    <div class="input-group date">
                        <input name="sqsj" th:value="${#dates.format(gcProjectSqkp.sqsj, 'yyyy-MM-dd')}" required class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
<!--                 <label class="col-sm-2 control-label is-required">项目地址：</label> -->
<!--                 <div class="col-sm-4"> -->
<!--                     <input name="xmdz" th:field="*{xmdz}" class="form-control" type="text" required> -->
<!--                 </div> -->
				<label class="col-sm-2 control-label is-required">项目类型：</label>
                <div class="col-sm-4">
                    <select name="xmlx" th:field="*{xmlx}" class="form-control m-b" required th:with="type=${@dict.getType('gcgl_project_type')}">
		                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
		            </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">合同金额：</label>
                <div class="col-sm-4">
                    <input name="htje" th:field="*{htje}" class="form-control" type="text" readonly="readonly" required>
                </div>
                <label class="col-sm-2 control-label is-required">发票类型：</label>
                <div class="col-sm-4">
                    <select name="fplx" th:field="*{fplx}" class="form-control" required th:with="type=${@dict.getType('gcgl_project_fp')}">
		                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
		            </select>
                </div>
            </div>
<!--             <div class="form-group">     -->
<!--                 <label class="col-sm-2 control-label is-required">本次申请开票金额：</label> -->
<!--                 <div class="col-sm-4"> -->
<!--                     <input name="bcsqkpje" th:field="*{bcsqkpje}" class="form-control" type="text" required> -->
<!--                 </div> -->
<!--                 <label class="col-sm-2 control-label is-required">预计收款金额：</label> -->
<!--                 <div class="col-sm-4"> -->
<!--                     <input name="yjskje" th:field="*{yjskje}" class="form-control" type="text" required> -->
<!--                 </div> -->
<!--             </div> -->
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">单位信息名称/税号：</label>
                <div class="col-sm-4">
                    <input name="shuih" th:field="*{shuih}" class="form-control" type="text" readonly="readonly" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">单位信息开户行/帐号：</label>
                <div class="col-sm-4">
                    <input name="kaihuh" th:field="*{kaihuh}" class="form-control" type="text" readonly="readonly" required>
                </div>
                <label class="col-sm-2 control-label is-required">单位信息地址/电话：</label>
                <div class="col-sm-4">
                    <input name="dizhi" th:field="*{dizhi}" class="form-control" type="text" readonly="readonly" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">已开发票时间：</label>
                <div class="col-sm-4">
                    <div class="input-group date">
                        <input name="ykfpsj" th:value="${#dates.format(gcProjectSqkp.ykfpsj, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
                <label class="col-sm-2 control-label">已开发票金额：</label>
                <div class="col-sm-4">
                    <input name="ykfpje" th:field="*{ykfpje}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">发票内容：</label>
                <div class="col-sm-4">
                    <input name="itemmc" th:field="*{itemmc}"  class="form-control" type="text" required>
                </div>
                <label class="col-sm-2 control-label is-required">建筑项目名称（与合同一致）：</label>
                <div class="col-sm-4">
                    <input name="itemgg" th:field="*{itemgg}"  class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">税率：</label>
                <div class="col-sm-4">
                	<select name="itemsl" class="form-control" th:field="*{itemsl}" required>
		                <option th:value="9">9%</option>
		                <option th:value="6">6%</option>
		                <option th:value="3">3%</option>
		                <option th:value="1">1%</option>
		                <option th:value="0">0%</option>
		                <option th:value="11">11%</option>
		                <option th:value="13">13%</option>
		            </select>
                </div>
                <label class="col-sm-2 control-label is-required">本次申请开票金额(含税)：</label>
                <div class="col-sm-4">
                    <input name="itemje" th:field="*{itemje}"  class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">合计(累计开票金额)：</label>
                <div class="col-sm-4">
                    <input name="hej" th:field="*{hej}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">备注：</label>
                <div class="col-sm-10">
                    <textarea name="memo" class="form-control">[[*{memo}]]</textarea>
                </div>
            </div>
        </form>
        <h4 class="form-header h4" style="margin-top: 25px;">历史开票信息</h4>
            <div class="form-group">
                <div class="col-sm-12" th:each="lis,status:${sqkplis}">
                	<span>开票金额：</span>
                	<span th:text="${lis.itemje}">&nbsp;</span>
                	<span>&nbsp;&nbsp;申请时间：</span>
                	<span th:text="${lis.createUser}">&nbsp;</span>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/sqkp";
        $("#form-sqkp-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/edit", $('#form-sqkp-edit').serialize());
            }
        }

        $("input[name='sqsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='xmfzrAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='ykfpsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='cwkprAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='zjlspAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

    </script>
</body>
</html>